//
//  repairHeadView.m
//  ICrEAM
//
//  Created by mac on 16/11/17.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "repairHeadView.h"
@interface repairHeadView ()

@end
@implementation repairHeadView
+(instancetype)createRepairHeadView{
    return [[[NSBundle mainBundle]loadNibNamed:@"repairHeadView" owner:nil options:nil]lastObject];
}
- (IBAction)orderClick:(UIButton *)sender {
    NSInteger ordertype=sender.tag-100;
    for (int i=1; i<5; i++) {
        UIView *view=[self viewWithTag:(1000+i)];
        if (ordertype==i) {
            view.backgroundColor=RGB(230, 236, 236);
        }
        else view.backgroundColor=[UIColor clearColor];
    }
    if (self.orderBlock) {
        self.orderBlock(ordertype);
    }
    
}
-(void)setSelectType:(NSInteger)selectType{
    _selectType=selectType;
    for (int i=1; i<5; i++) {
        UIView *view=[self viewWithTag:(1000+i)];
        if (_selectType==i) {
            view.backgroundColor=RGB(230, 236, 236);
        }
        else view.backgroundColor=[UIColor clearColor];
    }
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
